<template>
  <el-dialog
      title="批量导出照片"
      :visible.sync="dialogVisible"
      :close-on-press-escape="false"
      :close-on-click-modal="false"
      :before-close="handleOffDialog"
      width="30%"
  >
    <div class="title flex-j-between">
      <el-checkbox v-model="contain">包含原件</el-checkbox>
      <div class="text">照片名称按：</div>
      <el-select
          v-model="selectType"
          filterable
          clearable
          size="mini"
          style="width: 80%"
      >
        <el-option
            v-for="item in typeList"
            :key="item.type"
            :label="item.name"
            :value="item.type"
        >
        </el-option>
      </el-select>
      <div class="text">导出</div>
    </div>
    <div class="main">
      <el-button type="primary" size="mini" @click="handleExport">开始导出</el-button>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button size="mini" @click="handleOffDialog">关闭</el-button>
    </span>
  </el-dialog>
</template>

<script>
import {postAction} from "@/api/manage";

export default {
  name: 'ExportPhoto',
  components: {},
  data() {
    return {
      dialogVisible: false,
      selectType: '',
      contain: false,
      typeList: [
        {name:'姓名', type: 0},
        {name:'身份证', type: 1},
        {name:'姓名_身份证', type: 2},
      ],
      uuids: [] // 选中人员数据
    }
  },
  mounted() {},
  methods: {
    handleOpenDialog(uuids) {
      console.log('打开')
      this.uuids = uuids
      this.dialogVisible = true
    },
    handleOffDialog() {
      console.log('关闭')
      this.dialogVisible = false
      this.$emit('handleOffDialog')
    },
    /**
     * 图片导出
     */
    handleExport() {
      postAction().then(res=> {

      })
    }
  }
}
</script>

<style lang="less" scoped>
/*/deep/ .el-cascader .el-input .el-input__inner {*/
/*  height: 40px !important;*/
/*  line-height: 40px !important;*/
/*}*/
/deep/ .el-dialog__body {
  overflow-y: auto;
}
.flex-j-between {
  display: flex;
  align-items: center;
}
::v-deep .el-input--mini .el-input__inner {
  width: 120px;
}
::v-deep .el-input{
  width: 120px;
}
::v-deep .el-select{
  width: 120px !important;
}
.title {
  .text {
    width: 86px;
    color: rgb(245,54,52);
    margin-left: 12px;
  }
}
.main {
  text-align: center;
  margin-top: 110px;
}
.warning-title{
  color: #ff0000;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
}
</style>
